<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1038.35">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
p.p4 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; min-height: 12.0px}
p.p5 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica}
p.p6 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p7 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica; color: #000000; min-height: 14.0px}
p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #000000}
p.p9 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #007522; min-height: 12.0px}
p.p10 {margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica}
p.p11 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica}
p.p12 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica; min-height: 17.0px}
p.p13 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000}
p.p14 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000; min-height: 12.0px}
p.p15 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco}
p.p16 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
span.s1 {font: 18.0px Helvetica}
span.s2 {font: 9.0px Monaco; color: #007522}
span.s3 {color: #053ae0}
span.s4 {color: #950f0b}
span.Apple-tab-span {white-space:pre}
</style>
</head>
<body>
<p class="p1"><span class="s1"><b>TTendency<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span></b></span><b>a UGen to create dynamic random number distributions when triggered</b></p>
<p class="p2"><br></p>
<p class="p1"><b>Inherits from: UGen</b></p>
<p class="p2"><br></p>
<p class="p3"><b>Some Important Issues Regarding TTendency<span class="Apple-converted-space"> </span></b></p>
<p class="p2"><br></p>
<p class="p1">Though the parameters 'parX' and 'parY' are gnerally used to describe bounds over time, in certain distributions, these actual parameters may control other aspects of a random distribution. See the descriptions of the \cauchy, \gauss and \poisson distributions for more details.</p>
<p class="p2"><br></p>
<p class="p3"><b>Methods</b></p>
<p class="p4"><br></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>*ar (trigger, dist = 0, parX = 0, parY = 1, parA = 0, parB = 0)</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>*kr (trigger, dist = 0, parX = 0, parY = 1, parA = 0, parB = 0)</b></p>
<p class="p6"><b><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span></b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>trigger -<span class="Apple-converted-space"> </span></b> a trigger (a non-positive to positive transition)</p>
<p class="p5"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><b>dist -</b> a value between 0 and 15. Floats are truncated. Distribution types are:</p>
<p class="p7"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span></p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>0 = uniform</p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>1 = lowpass</p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>2 = highpass</p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>3 = mean</p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>4 = beta</p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>5 = cauchy</p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>6 = gauss</p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>7 = poisson</p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>8 = expRand</p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>9 = exponential</p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>10 = gamma</p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>11 = laplace</p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>12 = alaplace</p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>13 = hcos</p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>14 = logistic</p>
<p class="p8"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>15 = arcsin</p>
<p class="p9"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span></p>
<p class="p1"><span class="s2"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span></span><b>ALL PARAMETERS BELOW ARE POLLED WHEN A TRIGGER IS FOUND</b></p>
<p class="p2"><b><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span></b><span class="s2"><span class="Apple-tab-span">	</span></span></p>
<p class="p10"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><b>parX </b>- For the most common usage, describes the upper bounds of the distribution. Default value is 1.0.<span class="Apple-converted-space"> </span></p>
<p class="p10"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><b>parY </b>- For the most common usage, describes the upper bounds of the distribution.. Default value is 0.0.</p>
<p class="p10"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><b>parA </b>- For some distributions, the control of a specific parameter. Default value is 0.1</p>
<p class="p10"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><b>parB </b>-<span class="Apple-converted-space">  </span>For some distributions, the control of a specific parameter. Default value is 0.1.</p>
<p class="p6"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span></p>
<p class="p6"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span></p>
<p class="p11"><b>Using TTendency</b></p>
<p class="p12"><br></p>
<p class="p6"><br></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>below is a listing of how inputs will map to parameters. n/a means a parameter is not used in a<span class="Apple-converted-space"> </span></b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>distribution</b></p>
<p class="p6"><b><span class="Apple-tab-span">	</span></b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>dist<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>parX<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>parY<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>parA<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>parB</b></p>
<p class="p6"><b><span class="Apple-tab-span">	</span></b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\uniform<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>low<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>high<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\lpRand<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>low<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>high<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\hpRand<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>low<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>high<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\meanRand<span class="Apple-tab-span">	</span>low<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>high<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\betaRand<span class="Apple-tab-span">	</span>low<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>high<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>lowProb<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>highProb</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\cauchy<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>mean<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>spread<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>posOnly<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\gauss<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>dev<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>mean<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\poisson<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>mean<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\expRand<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>low<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>high<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\exponential<span class="Apple-tab-span">	</span>density<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\gamma<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>mode<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\laplace<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>dispersion<span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\alaplace<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>dispersion<span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\hcos<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>dispersion<span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\logistic<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>dispersion<span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a</b></p>
<p class="p5"><b><span class="Apple-tab-span">	</span>\arcsin<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>dispersion<span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a<span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>n/a</b></p>
<p class="p6"><b><span class="Apple-tab-span">	</span></b></p>
<p class="p11"><b>Examples:</b></p>
<p class="p12"><b></b><br></p>
<p class="p13">s.boot;</p>
<p class="p14"><br></p>
<p class="p13"><span class="s3">SynthDef</span>(<span class="s4">\ttendency</span>, {<span class="s3">arg</span> trigrate = <span class="s3">10</span>, dist = <span class="s3">0</span>, x = <span class="s3">0</span>, y = 1, a = <span class="s3">0.1</span>, b = <span class="s3">0.1</span>;</p>
<p class="p13"><span class="Apple-tab-span">	</span><span class="s3">var</span> trig, grains, tendency;</p>
<p class="p13"><span class="Apple-tab-span">	</span>trig = <span class="s3">Impulse</span>.ar(trigrate);</p>
<p class="p13"><span class="Apple-tab-span">	</span>tendency = <span class="s3">TTendency.ar</span>(trig, dist, x, y, a, b);</p>
<p class="p13"><span class="Apple-tab-span">	</span>tendency.poll(trig);</p>
<p class="p13"><span class="Apple-tab-span">	</span>grains = <span class="s3">GrainSin</span>.ar(<span class="s3">2</span>, trig, <span class="s3">0.05</span>, tendency * <span class="s3">1760 </span>+ <span class="s3">220</span>, tendency * <span class="s3">2 </span>- <span class="s3">1</span>);</p>
<p class="p13"><span class="Apple-tab-span">	</span><span class="s3">Out</span>.ar(<span class="s3">0</span>, grains * 0.2);</p>
<p class="p13">}).add;</p>
<p class="p14"><br></p>
<p class="p13">// uniform</p>
<p class="p13">a = Synth(\ttendency);</p>
<p class="p14"><br></p>
<p class="p13">// lowpass</p>
<p class="p13">a.set(\dist, 1);</p>
<p class="p14"><br></p>
<p class="p15">// highpass</p>
<p class="p15">a.set(\dist, 2);</p>
<p class="p16"><br></p>
<p class="p15">// mean</p>
<p class="p15">a.set(\dist, 3);</p>
<p class="p16"><br></p>
<p class="p15">// beta</p>
<p class="p15">a.set(\dist, 4);</p>
<p class="p15">a.set(\a, 0.5, \b, 0.5);</p>
<p class="p15">a.set(\a, 1, \b, 1);</p>
<p class="p15">a.set(\a, 2, \b, 2);</p>
<p class="p16"><br></p>
<p class="p15">// ... etc ...</p>
<p class="p16"><br></p>
<p class="p15">a.free;</p>
<p class="p16"><br></p>
<p class="p15">s.quit;</p>
</body>
</html>
